<?php

function getUserInfo($name, $pass) {
    $dbsql = "SELECT * FROM useradmin WHERE us_username = '" . $name . "' AND us_password = '" . $pass ."'";
    $dbresult = db()->getFirst($dbsql, MYSQL_ASSOC);
    if (!$dbresult) {
        return null;
    }
    return $dbresult;
    
}

function setSession($urow) {
    if (isset($urow)) {
        $_SESSION['a_id'] = $urow['useradminid'];
        $_SESSION['a_username'] = $urow['us_username'];
        Js::gourl('home');
    }
}
?>
